﻿using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
namespace WPFExcelReport
{
    public partial class VGSCOLOR
    {
        #region
        #endregion
        public void SetUpNewRow(ref DataRow dwReturn, DataRow dwInput = null)
        {
            switch (app.company)
            {
                case "FLT":
                    DataSet SResult = new DataSet();
                    SResult = QueryGSCOLOR(dwInput, 0);
                    dwReturn = SResult.Tables[0].Rows[0];
                    #region
                    dwReturn["GSCMANDANT"] = "00";
                    dwReturn["GSCART"] = "                    ";
                    dwReturn["GSCVAR"] = "   ";
                    dwReturn["GSCFARBE"] = "          ";
                    dwReturn["GSCAENDZL"] = "0";
                    dwReturn["GSCAENDBEN"] = "        ";
                    dwReturn["GSCAENDDAT"] = "0";
                    dwReturn["GSCNEUBEN"] = "        ";
                    dwReturn["GSCNEUDAT"] = "        ";
                    dwReturn["GSCSTATUS"] = "A";
                    dwReturn["GSCSFKZ"] = "N";
                    dwReturn["GSCBEZ"] = "                    ";
                    dwReturn["GSCFKARTNR"] = "          ";
                    dwReturn["GSCKTFARBE"] = "          ";
                    dwReturn["GSCBOM"] = "F";
                    dwReturn["GSCBOMCGRP"] = " ";
                    dwReturn["GSCFDVF"] = "   ";
                    dwReturn["GSCVORB"] = "   ";
                    dwReturn["GSCNACHB"] = "   ";
                    dwReturn["GSCFA"] = "0";
                    dwReturn["GSCRUESTGRP"] = "   ";
                    dwReturn["GSCPRUEFGRP"] = " ";
                    dwReturn["GSCSTATVF"] = "   ";
                    dwReturn["GSCKZDUMCOL"] = " ";
                    dwReturn["GSCPSEUDOCOL"] = "          ";
                    dwReturn["GSCTEXTSCHL"] = "          ";
                    dwReturn["GSCMUFRB"] = "          ";
                    dwReturn["GSCSCHLIAUF"] = "0";
                    dwReturn["GSCFIXTEMP"] = "0";
                    dwReturn["GSCFIXTIME"] = "0";
                    dwReturn["GSCABRASION"] = "0";
                    dwReturn["GSCABRAMTR"] = "0";
                    dwReturn["GSCPROGRP"] = "   ";
                    dwReturn["GSCARTGRP"] = "   ";
                    dwReturn["GSCRECHNUM"] = "    ";
                    dwReturn["GSCRECHNR"] = "0";
                    dwReturn["GSCPRGRP"] = " ";
                    dwReturn["GSCPREIS"] = "0";
                    dwReturn["GSCZUAK"] = "0";
                    dwReturn["GSCZUPROZ"] = " ";
                    dwReturn["GSCANFART"] = "    ";
                    dwReturn["GSCWERT"] = "0";
                    dwReturn["GSCWERTPROZ"] = " ";
                    dwReturn["GSCZUAB"] = "0";
                    dwReturn["GSCZUABPROZ"] = " ";
                    dwReturn["GSCZTWAHL"] = "0";
                    dwReturn["GSCVERLUST"] = "0";
                    dwReturn["GSCKALKMG"] = "0";
                    dwReturn["GSCLOAN"] = "  ";
                    dwReturn["GSCLBAN"] = "  ";
                    dwReturn["GSCLPAN"] = "        ";
                    dwReturn["GSCPKL"] = "  ";
                    dwReturn["GSCMU"] = " ";
                    dwReturn["GSCMURLOD"] = "00";
                    dwReturn["GSCMUPROD"] = "00";
                    dwReturn["GSCMUCTOD"] = " ";
                    dwReturn["GSCMUBIRL"] = "        ";
                    dwReturn["GSCMUDTRL"] = "0";
                    dwReturn["GSCCOLPT1"] = " ";
                    dwReturn["GSCCOLPT2"] = " ";
                    dwReturn["GSCCOLPT3"] = " ";
                    dwReturn["GSCCOLPT4"] = " ";
                    dwReturn["GSCRGBWERT1"] = "   ";
                    dwReturn["GSCRGBWERT2"] = "   ";
                    dwReturn["GSCRGBWERT3"] = "   ";
                    dwReturn["GSCFILLER"] = "                                           ";
                    #endregion
                    break;
                case "YGR":
                case "TST":
                case "SXN":
                case "UBT":
                default:
                    #region 
                    dwReturn["GSCMANDANT"] = "00";
                    dwReturn["GSCART"] = "                    ";
                    dwReturn["GSCVAR"] = "   ";
                    dwReturn["GSCFARBE"] = "          ";
                    dwReturn["GSCAENDZL"] = "0";
                    dwReturn["GSCAENDBEN"] = "        ";
                    dwReturn["GSCAENDDAT"] = "0";
                    dwReturn["GSCNEUBEN"] = "        ";
                    dwReturn["GSCNEUDAT"] = "0";
                    dwReturn["GSCSTATUS"] = "A";
                    dwReturn["GSCSFKZ"] = "N";
                    dwReturn["GSCBEZ"] = "                    ";
                    dwReturn["GSCFKARTNR"] = "          ";
                    dwReturn["GSCKTFARBE"] = "          ";
                    dwReturn["GSCBOM"] = "F";
                    dwReturn["GSCBOMCGRP"] = " ";
                    dwReturn["GSCFDVF"] = "   ";
                    dwReturn["GSCVORB"] = "   ";
                    dwReturn["GSCNACHB"] = "   ";
                    dwReturn["GSCFA"] = "0";
                    dwReturn["GSCRUESTGRP"] = "   ";
                    dwReturn["GSCPRUEFGRP"] = " ";
                    dwReturn["GSCSTATVF"] = "   ";
                    dwReturn["GSCKZDUMCOL"] = " ";
                    dwReturn["GSCPSEUDOCOL"] = "          ";
                    dwReturn["GSCTEXTSCHL"] = "          ";
                    dwReturn["GSCMUFRB"] = "          ";
                    dwReturn["GSCSCHLIAUF"] = "0";
                    dwReturn["GSCFIXTEMP"] = "0";
                    dwReturn["GSCFIXTIME"] = "0";
                    dwReturn["GSCABRASION"] = "0";
                    dwReturn["GSCABRAMTR"] = "0";
                    dwReturn["GSCPROGRP"] = "   ";
                    dwReturn["GSCARTGRP"] = "   ";
                    dwReturn["GSCRECHNUM"] = "    ";
                    dwReturn["GSCRECHNR"] = "0";
                    dwReturn["GSCPRGRP"] = " ";
                    dwReturn["GSCPREIS"] = "0";
                    dwReturn["GSCZUAK"] = "0";
                    dwReturn["GSCZUPROZ"] = " ";
                    dwReturn["GSCANFART"] = "    ";
                    dwReturn["GSCWERT"] = "0";
                    dwReturn["GSCWERTPROZ"] = " ";
                    dwReturn["GSCZUAB"] = "0";
                    dwReturn["GSCZUABPROZ"] = " ";
                    dwReturn["GSCZTWAHL"] = "0";
                    dwReturn["GSCVERLUST"] = "0";
                    dwReturn["GSCKALKMG"] = "0";
                    dwReturn["GSCLOAN"] = "  ";
                    dwReturn["GSCLBAN"] = "  ";
                    dwReturn["GSCLPAN"] = "        ";
                    dwReturn["GSCPKL"] = "  ";
                    dwReturn["GSCMU"] = " ";
                    dwReturn["GSCMURLOD"] = "00";
                    dwReturn["GSCMUPROD"] = "00";
                    dwReturn["GSCMUCTOD"] = " ";
                    dwReturn["GSCMUBIRL"] = "        ";
                    dwReturn["GSCMUDTRL"] = "0";
                    dwReturn["GSCCOLPT1"] = " ";
                    dwReturn["GSCCOLPT2"] = " ";
                    dwReturn["GSCCOLPT3"] = " ";
                    dwReturn["GSCCOLPT4"] = " ";
                    dwReturn["GSCFILLER"] = "                                                    ";
                    #endregion
                    break;
                case "JLT":
                    dwReturn["GSCMANDANT"] = "00";
                    dwReturn["GSCART"] = "                    ";
                    dwReturn["GSCVAR"] = "   ";
                    dwReturn["GSCFARBE"] = "          ";
                    dwReturn["GSCAENDZL"] = "0";
                    dwReturn["GSCAENDBEN"] = "        ";
                    dwReturn["GSCAENDDAT"] = "0";
                    dwReturn["GSCNEUBEN"] = "        ";
                    dwReturn["GSCNEUDAT"] = "0";
                    dwReturn["GSCSTATUS"] = "A";
                    dwReturn["GSCSFKZ"] = "N";
                    dwReturn["GSCBEZ"] = "±¾°×                ";
                    dwReturn["GSCFKARTNR"] = "          ";
                    dwReturn["GSCKTFARBE"] = "          ";
                    dwReturn["GSCBOM"] = " ";
                    dwReturn["GSCBOMCGRP"] = " ";
                    dwReturn["GSCFDVF"] = "   ";
                    dwReturn["GSCVORB"] = "   ";
                    dwReturn["GSCNACHB"] = "   ";
                    dwReturn["GSCFA"] = "0";
                    dwReturn["GSCRUESTGRP"] = "   ";
                    dwReturn["GSCPRUEFGRP"] = " ";
                    dwReturn["GSCSTATVF"] = "   ";
                    dwReturn["GSCKZDUMCOL"] = " ";
                    dwReturn["GSCPSEUDOCOL"] = "          ";
                    dwReturn["GSCTEXTSCHL"] = "          ";
                    dwReturn["GSCMUFRB"] = "          ";
                    dwReturn["GSCSCHLIAUF"] = "0";
                    dwReturn["GSCFIXTEMP"] = "0";
                    dwReturn["GSCFIXTIME"] = "0";
                    dwReturn["GSCABRASION"] = "0";
                    dwReturn["GSCABRAMTR"] = "0";
                    dwReturn["GSCPROGRP"] = "   ";
                    dwReturn["GSCARTGRP"] = "   ";
                    dwReturn["GSCRECHNUM"] = "    ";
                    dwReturn["GSCRECHNR"] = "0";
                    dwReturn["GSCPRGRP"] = " ";
                    dwReturn["GSCPREIS"] = "0";
                    dwReturn["GSCZUAK"] = "0";
                    dwReturn["GSCZUPROZ"] = " ";
                    dwReturn["GSCANFART"] = "    ";
                    dwReturn["GSCWERT"] = "0";
                    dwReturn["GSCWERTPROZ"] = " ";
                    dwReturn["GSCZUAB"] = "0";
                    dwReturn["GSCZUABPROZ"] = " ";
                    dwReturn["GSCZTWAHL"] = "0";
                    dwReturn["GSCVERLUST"] = "0";
                    dwReturn["GSCKALKMG"] = "0";
                    dwReturn["GSCLOAN"] = "  ";
                    dwReturn["GSCLBAN"] = "  ";
                    dwReturn["GSCLPAN"] = "        ";
                    dwReturn["GSCPKL"] = "  ";
                    dwReturn["GSCMU"] = " ";
                    dwReturn["GSCMURLOD"] = "00";
                    dwReturn["GSCMUPROD"] = "00";
                    dwReturn["GSCMUCTOD"] = " ";
                    dwReturn["GSCMUBIRL"] = "        ";
                    dwReturn["GSCMUDTRL"] = "0";
                    dwReturn["GSCCOLPT1"] = " ";
                    dwReturn["GSCCOLPT2"] = " ";
                    dwReturn["GSCCOLPT3"] = " ";
                    dwReturn["GSCCOLPT4"] = " ";
                    dwReturn["GSCFILLER"] = "                                                    ";

                    break;
                
            }
            INTEXDBC.MapData(true, ref dwReturn, dwInput);
            if (app.company == "FLT")
            {
                dwReturn["GSCFILLER"] = "                                           ";
            }
        }
        public DataRow Convert2GSCOLOR(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryGSCOLOR(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
                    dwReturn["GSCMANDANT"] = "00";
                    dwReturn["GSCART"] = "                    ";
                    dwReturn["GSCVAR"] = "   ";
                    dwReturn["GSCFARBE"] = "          ";
                    dwReturn["GSCAENDZL"] = "0";
                    dwReturn["GSCAENDBEN"] = "        ";
                    dwReturn["GSCAENDDAT"] = "0";
                    dwReturn["GSCNEUBEN"] = "        ";
                    dwReturn["GSCNEUDAT"] = "0";
                    dwReturn["GSCSTATUS"] = "A";
                    dwReturn["GSCSFKZ"] = "N";
                    dwReturn["GSCBEZ"] = "                    ";
                    dwReturn["GSCFKARTNR"] = "          ";
                    dwReturn["GSCKTFARBE"] = "          ";
                    dwReturn["GSCBOM"] = "F";
                    dwReturn["GSCBOMCGRP"] = " ";
                    dwReturn["GSCFDVF"] = "   ";
                    dwReturn["GSCVORB"] = "   ";
                    dwReturn["GSCNACHB"] = "   ";
                    dwReturn["GSCFA"] = "0";
                    dwReturn["GSCRUESTGRP"] = "   ";
                    dwReturn["GSCPRUEFGRP"] = " ";
                    dwReturn["GSCSTATVF"] = "   ";
                    dwReturn["GSCKZDUMCOL"] = " ";
                    dwReturn["GSCPSEUDOCOL"] = "          ";
                    dwReturn["GSCTEXTSCHL"] = "          ";
                    dwReturn["GSCMUFRB"] = "          ";
                    dwReturn["GSCSCHLIAUF"] = "0";
                    dwReturn["GSCFIXTEMP"] = "0";
                    dwReturn["GSCFIXTIME"] = "0";
                    dwReturn["GSCABRASION"] = "0";
                    dwReturn["GSCABRAMTR"] = "0";
                    dwReturn["GSCPROGRP"] = "   ";
                    dwReturn["GSCARTGRP"] = "   ";
                    dwReturn["GSCRECHNUM"] = "    ";
                    dwReturn["GSCRECHNR"] = "0";
                    dwReturn["GSCPRGRP"] = " ";
                    dwReturn["GSCPREIS"] = "0";
                    dwReturn["GSCZUAK"] = "0";
                    dwReturn["GSCZUPROZ"] = " ";
                    dwReturn["GSCANFART"] = "    ";
                    dwReturn["GSCWERT"] = "0";
                    dwReturn["GSCWERTPROZ"] = " ";
                    dwReturn["GSCZUAB"] = "0";
                    dwReturn["GSCZUABPROZ"] = " ";
                    dwReturn["GSCZTWAHL"] = "0";
                    dwReturn["GSCVERLUST"] = "0";
                    dwReturn["GSCKALKMG"] = "0";
                    dwReturn["GSCLOAN"] = "  ";
                    dwReturn["GSCLBAN"] = "  ";
                    dwReturn["GSCLPAN"] = "        ";
                    dwReturn["GSCPKL"] = "  ";
                    dwReturn["GSCMU"] = " ";
                    dwReturn["GSCMURLOD"] = "00";
                    dwReturn["GSCMUPROD"] = "00";
                    dwReturn["GSCMUCTOD"] = " ";
                    dwReturn["GSCMUBIRL"] = "        ";
                    dwReturn["GSCMUDTRL"] = "0";
                    dwReturn["GSCCOLPT1"] = " ";
                    dwReturn["GSCCOLPT2"] = " ";
                    dwReturn["GSCCOLPT3"] = " ";
                    dwReturn["GSCCOLPT4"] = " ";
                    dwReturn["GSCFILLER"] = "                                                    ";

                    #endregion
                    break;
                case "JLT":
                    dwReturn["GSCMANDANT"] = "00";
                    dwReturn["GSCART"] = "CC161               ";
                    dwReturn["GSCVAR"] = "1  ";
                    dwReturn["GSCFARBE"] = "WH12      ";
                    dwReturn["GSCAENDZL"] = "0";
                    dwReturn["GSCAENDBEN"] = "CAD     ";
                    dwReturn["GSCAENDDAT"] = "20140805";
                    dwReturn["GSCNEUBEN"] = "CAD     ";
                    dwReturn["GSCNEUDAT"] = "20140805";
                    dwReturn["GSCSTATUS"] = "A";
                    dwReturn["GSCSFKZ"] = "N";
                    dwReturn["GSCBEZ"] = "±¾°×                ";
                    dwReturn["GSCFKARTNR"] = "          ";
                    dwReturn["GSCKTFARBE"] = "          ";
                    dwReturn["GSCBOM"] = " ";
                    dwReturn["GSCBOMCGRP"] = " ";
                    dwReturn["GSCFDVF"] = "   ";
                    dwReturn["GSCVORB"] = "   ";
                    dwReturn["GSCNACHB"] = "   ";
                    dwReturn["GSCFA"] = "0";
                    dwReturn["GSCRUESTGRP"] = "   ";
                    dwReturn["GSCPRUEFGRP"] = " ";
                    dwReturn["GSCSTATVF"] = "   ";
                    dwReturn["GSCKZDUMCOL"] = " ";
                    dwReturn["GSCPSEUDOCOL"] = "          ";
                    dwReturn["GSCTEXTSCHL"] = "          ";
                    dwReturn["GSCMUFRB"] = "          ";
                    dwReturn["GSCSCHLIAUF"] = "0";
                    dwReturn["GSCFIXTEMP"] = "0";
                    dwReturn["GSCFIXTIME"] = "0";
                    dwReturn["GSCABRASION"] = "0";
                    dwReturn["GSCABRAMTR"] = "0";
                    dwReturn["GSCPROGRP"] = "   ";
                    dwReturn["GSCARTGRP"] = "   ";
                    dwReturn["GSCRECHNUM"] = "    ";
                    dwReturn["GSCRECHNR"] = "0";
                    dwReturn["GSCPRGRP"] = " ";
                    dwReturn["GSCPREIS"] = "0";
                    dwReturn["GSCZUAK"] = "0";
                    dwReturn["GSCZUPROZ"] = " ";
                    dwReturn["GSCANFART"] = "    ";
                    dwReturn["GSCWERT"] = "0";
                    dwReturn["GSCWERTPROZ"] = " ";
                    dwReturn["GSCZUAB"] = "0";
                    dwReturn["GSCZUABPROZ"] = " ";
                    dwReturn["GSCZTWAHL"] = "0";
                    dwReturn["GSCVERLUST"] = "0";
                    dwReturn["GSCKALKMG"] = "0";
                    dwReturn["GSCLOAN"] = "  ";
                    dwReturn["GSCLBAN"] = "  ";
                    dwReturn["GSCLPAN"] = "        ";
                    dwReturn["GSCPKL"] = "  ";
                    dwReturn["GSCMU"] = " ";
                    dwReturn["GSCMURLOD"] = "00";
                    dwReturn["GSCMUPROD"] = "00";
                    dwReturn["GSCMUCTOD"] = " ";
                    dwReturn["GSCMUBIRL"] = "        ";
                    dwReturn["GSCMUDTRL"] = "0";
                    dwReturn["GSCCOLPT1"] = " ";
                    dwReturn["GSCCOLPT2"] = " ";
                    dwReturn["GSCCOLPT3"] = " ";
                    dwReturn["GSCCOLPT4"] = " ";
                    dwReturn["GSCFILLER"] = "                                                    ";
                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapGSCOLOR(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveGSCOLOR(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryGSCOLOR(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }

            MapGSCOLOR(ref dwLocal, dwData);

            if (!flgExist)
            {
                InsertGSCOLOR(dwLocal);
            }
            UpdateGSCOLOR(dwLocal);
        }
        public void InsertGSCOLOR(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            dwData["GSCNEUBEN"] =app.User;
            dwData["GSCNEUDAT"] = date; 
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "JLT":
                    or1.CommandText = "INSERT INTO GSCOLOR ( GSCMANDANT,GSCART,GSCVAR,GSCFARBE,GSCAENDZL,GSCAENDBEN,GSCAENDDAT,GSCNEUBEN,GSCNEUDAT,GSCSTATUS,GSCSFKZ,GSCBEZ,GSCFKARTNR,GSCKTFARBE,GSCBOM,GSCBOMCGRP,GSCFDVF,GSCVORB,GSCNACHB,GSCFA,GSCRUESTGRP,GSCPRUEFGRP,GSCSTATVF,GSCKZDUMCOL,GSCPSEUDOCOL,GSCTEXTSCHL,GSCMUFRB,GSCSCHLIAUF,GSCFIXTEMP,GSCFIXTIME,GSCABRASION,GSCABRAMTR,GSCPROGRP,GSCARTGRP,GSCRECHNUM,GSCRECHNR,GSCPRGRP,GSCPREIS,GSCZUAK,GSCZUPROZ,GSCANFART,GSCWERT,GSCWERTPROZ,GSCZUAB,GSCZUABPROZ,GSCZTWAHL,GSCVERLUST,GSCKALKMG,GSCLOAN,GSCLBAN,GSCLPAN,GSCPKL,GSCMU,GSCMURLOD,GSCMUPROD,GSCMUCTOD,GSCMUBIRL,GSCMUDTRL,GSCCOLPT1,GSCCOLPT2,GSCCOLPT3,GSCCOLPT4,GSCFILLER)"
                + " VALUES (:GSCMANDANT:,:GSCART:,:GSCVAR:,:GSCFARBE:,:GSCAENDZL:,:GSCAENDBEN:,:GSCAENDDAT:,:GSCNEUBEN:,:GSCNEUDAT:,:GSCSTATUS:,:GSCSFKZ:,:GSCBEZ:,:GSCFKARTNR:,:GSCKTFARBE:,:GSCBOM:,:GSCBOMCGRP:,:GSCFDVF:,:GSCVORB:,:GSCNACHB:,:GSCFA:,:GSCRUESTGRP:,:GSCPRUEFGRP:,:GSCSTATVF:,:GSCKZDUMCOL:,:GSCPSEUDOCOL:,:GSCTEXTSCHL:,:GSCMUFRB:,:GSCSCHLIAUF:,:GSCFIXTEMP:,:GSCFIXTIME:,:GSCABRASION:,:GSCABRAMTR:,:GSCPROGRP:,:GSCARTGRP:,:GSCRECHNUM:,:GSCRECHNR:,:GSCPRGRP:,:GSCPREIS:,:GSCZUAK:,:GSCZUPROZ:,:GSCANFART:,:GSCWERT:,:GSCWERTPROZ:,:GSCZUAB:,:GSCZUABPROZ:,:GSCZTWAHL:,:GSCVERLUST:,:GSCKALKMG:,:GSCLOAN:,:GSCLBAN:,:GSCLPAN:,:GSCPKL:,:GSCMU:,:GSCMURLOD:,:GSCMUPROD:,:GSCMUCTOD:,:GSCMUBIRL:,:GSCMUDTRL:,:GSCCOLPT1:,:GSCCOLPT2:,:GSCCOLPT3:,:GSCCOLPT4:,:GSCFILLER:)";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);

                    break;
                case "FLT":
                    or1.CommandText = "INSERT INTO GSCOLOR ( GSCMANDANT,GSCART,GSCVAR,GSCFARBE,GSCAENDZL,GSCAENDBEN,GSCAENDDAT,GSCNEUBEN,GSCNEUDAT,GSCSTATUS,GSCSFKZ,GSCBEZ,GSCFKARTNR,GSCKTFARBE,GSCBOM,GSCBOMCGRP,GSCFDVF,GSCVORB,GSCNACHB,GSCFA,GSCRUESTGRP,GSCPRUEFGRP,GSCSTATVF,GSCKZDUMCOL,GSCPSEUDOCOL,GSCTEXTSCHL,GSCMUFRB,GSCSCHLIAUF,GSCFIXTEMP,GSCFIXTIME,GSCABRASION,GSCABRAMTR,GSCPROGRP,GSCARTGRP,GSCRECHNUM,GSCRECHNR,GSCPRGRP,GSCPREIS,GSCZUAK,GSCZUPROZ,GSCANFART,GSCWERT,GSCWERTPROZ,GSCZUAB,GSCZUABPROZ,GSCZTWAHL,GSCVERLUST,GSCKALKMG,GSCLOAN,GSCLBAN,GSCLPAN,GSCPKL,GSCMU,GSCMURLOD,GSCMUPROD,GSCMUCTOD,GSCMUBIRL,GSCMUDTRL,GSCCOLPT1,GSCCOLPT2,GSCCOLPT3,GSCCOLPT4,GSCRGBWERT1,GSCRGBWERT2,GSCRGBWERT3,GSCFILLER)"
                    + " VALUES (:GSCMANDANT:,:GSCART:,:GSCVAR:,:GSCFARBE:,:GSCAENDZL:,:GSCAENDBEN:,:GSCAENDDAT:,:GSCNEUBEN:,:GSCNEUDAT:,:GSCSTATUS:,:GSCSFKZ:,:GSCBEZ:,:GSCFKARTNR:,:GSCKTFARBE:,:GSCBOM:,:GSCBOMCGRP:,:GSCFDVF:,:GSCVORB:,:GSCNACHB:,:GSCFA:,:GSCRUESTGRP:,:GSCPRUEFGRP:,:GSCSTATVF:,:GSCKZDUMCOL:,:GSCPSEUDOCOL:,:GSCTEXTSCHL:,:GSCMUFRB:,:GSCSCHLIAUF:,:GSCFIXTEMP:,:GSCFIXTIME:,:GSCABRASION:,:GSCABRAMTR:,:GSCPROGRP:,:GSCARTGRP:,:GSCRECHNUM:,:GSCRECHNR:,:GSCPRGRP:,:GSCPREIS:,:GSCZUAK:,:GSCZUPROZ:,:GSCANFART:,:GSCWERT:,:GSCWERTPROZ:,:GSCZUAB:,:GSCZUABPROZ:,:GSCZTWAHL:,:GSCVERLUST:,:GSCKALKMG:,:GSCLOAN:,:GSCLBAN:,:GSCLPAN:,:GSCPKL:,:GSCMU:,:GSCMURLOD:,:GSCMUPROD:,:GSCMUCTOD:,:GSCMUBIRL:,:GSCMUDTRL:,:GSCCOLPT1:,:GSCCOLPT2:,:GSCCOLPT3:,:GSCCOLPT4:,:GSCRGBWERT1:,:GSCRGBWERT2:,:GSCRGBWERT3:,:GSCFILLER:)";

                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    break;
                case "YGR":
                case "TST":
                case "SXN":
                case "UBT":
                default:
                    or1.CommandText = "INSERT INTO GSCOLOR ( GSCMANDANT,GSCART,GSCVAR,GSCFARBE,GSCAENDZL,GSCAENDBEN,GSCAENDDAT,GSCNEUBEN,GSCNEUDAT,GSCSTATUS,GSCSFKZ,GSCBEZ,GSCFKARTNR,GSCKTFARBE,GSCBOM,GSCBOMCGRP,GSCFDVF,GSCVORB,GSCNACHB,GSCFA,GSCRUESTGRP,GSCPRUEFGRP,GSCSTATVF,GSCKZDUMCOL,GSCPSEUDOCOL,GSCTEXTSCHL,GSCMUFRB,GSCSCHLIAUF,GSCFIXTEMP,GSCFIXTIME,GSCABRASION,GSCABRAMTR,GSCPROGRP,GSCARTGRP,GSCRECHNUM,GSCRECHNR,GSCPRGRP,GSCPREIS,GSCZUAK,GSCZUPROZ,GSCANFART,GSCWERT,GSCWERTPROZ,GSCZUAB,GSCZUABPROZ,GSCZTWAHL,GSCVERLUST,GSCKALKMG,GSCLOAN,GSCLBAN,GSCLPAN,GSCPKL,GSCMU,GSCMURLOD,GSCMUPROD,GSCMUCTOD,GSCMUBIRL,GSCMUDTRL,GSCCOLPT1,GSCCOLPT2,GSCCOLPT3,GSCCOLPT4,GSCFILLER)"
                    + " VALUES (:GSCMANDANT:,:GSCART:,:GSCVAR:,:GSCFARBE:,:GSCAENDZL:,:GSCAENDBEN:,:GSCAENDDAT:,:GSCNEUBEN:,:GSCNEUDAT:,:GSCSTATUS:,:GSCSFKZ:,:GSCBEZ:,:GSCFKARTNR:,:GSCKTFARBE:,:GSCBOM:,:GSCBOMCGRP:,:GSCFDVF:,:GSCVORB:,:GSCNACHB:,:GSCFA:,:GSCRUESTGRP:,:GSCPRUEFGRP:,:GSCSTATVF:,:GSCKZDUMCOL:,:GSCPSEUDOCOL:,:GSCTEXTSCHL:,:GSCMUFRB:,:GSCSCHLIAUF:,:GSCFIXTEMP:,:GSCFIXTIME:,:GSCABRASION:,:GSCABRAMTR:,:GSCPROGRP:,:GSCARTGRP:,:GSCRECHNUM:,:GSCRECHNR:,:GSCPRGRP:,:GSCPREIS:,:GSCZUAK:,:GSCZUPROZ:,:GSCANFART:,:GSCWERT:,:GSCWERTPROZ:,:GSCZUAB:,:GSCZUABPROZ:,:GSCZTWAHL:,:GSCVERLUST:,:GSCKALKMG:,:GSCLOAN:,:GSCLBAN:,:GSCLPAN:,:GSCPKL:,:GSCMU:,:GSCMURLOD:,:GSCMUPROD:,:GSCMUCTOD:,:GSCMUBIRL:,:GSCMUDTRL:,:GSCCOLPT1:,:GSCCOLPT2:,:GSCCOLPT3:,:GSCCOLPT4:,:GSCFILLER:)";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
                    break;
            }
            Connect2Proxy(or1);
        }
        public override string BATCHINSERT(DataRow dwData)
        {
            dwData["GSCNEUBEN"] = app.User;
            dwData["GSCNEUDAT"] = date;
            string value = "";
            switch (app.company)
            {
                default:
                case "SXN":
                case "YGR":
                case "TST":
                    value = "INTO GSCOLOR  "
                    + " VALUES (:GSCMANDANT:,:GSCART:,:GSCVAR:,:GSCFARBE:,:GSCAENDZL:,:GSCAENDBEN:,:GSCAENDDAT:,:GSCNEUBEN:,:GSCNEUDAT:,:GSCSTATUS:,:GSCSFKZ:,:GSCBEZ:,:GSCFKARTNR:,:GSCKTFARBE:,:GSCBOM:,:GSCBOMCGRP:,:GSCFDVF:,:GSCVORB:,:GSCNACHB:,:GSCFA:,:GSCRUESTGRP:,:GSCPRUEFGRP:,:GSCSTATVF:,:GSCKZDUMCOL:,:GSCPSEUDOCOL:,:GSCTEXTSCHL:,:GSCMUFRB:,:GSCSCHLIAUF:,:GSCFIXTEMP:,:GSCFIXTIME:,:GSCABRASION:,:GSCABRAMTR:,:GSCPROGRP:,:GSCARTGRP:,:GSCRECHNUM:,:GSCRECHNR:,:GSCPRGRP:,:GSCPREIS:,:GSCZUAK:,:GSCZUPROZ:,:GSCANFART:,:GSCWERT:,:GSCWERTPROZ:,:GSCZUAB:,:GSCZUABPROZ:,:GSCZTWAHL:,:GSCVERLUST:,:GSCKALKMG:,:GSCLOAN:,:GSCLBAN:,:GSCLPAN:,:GSCPKL:,:GSCMU:,:GSCMURLOD:,:GSCMUPROD:,:GSCMUCTOD:,:GSCMUBIRL:,:GSCMUDTRL:,:GSCCOLPT1:,:GSCCOLPT2:,:GSCCOLPT3:,:GSCCOLPT4:,:GSCFILLER:)";
                    value = INTEXDBC.InjectData(value, dwData);
                    break;
            }
            return value;
        }
        public DataSet QueryGSCOLOR(DataRow dwData, int option = 1)
        { 
            
            switch (option)
            {
                case 0:
                    SResult = QGC00(dwData);
                    break;
                case 1:
                    SResult = QGC01(dwData);
                    break;
                case 3:
                    SResult = QGC03(dwData);
                    break;
                case 4:
                    SResult = QGC04(dwData);
                    break;
                case 5:
                    SResult = QGC05(dwData);
                    break;
                case 6:
                    SResult = QGC06(dwData);
                    break;
                case 7:
                    SResult = QGC07(dwData);
                    break;
                case 8:
                    SResult = QGC08(dwData);
                    break;
                case -1:
                    SResult = QGC_1(dwData);
                    break;
                case 2:
                    SResult = QGC_2(dwData);
                    break;
            } 
         
            return SResult;
        }
        public DataSet QGC00(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT * FROM GSCOLOR WHERE  ROWNUM<2 ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData); 
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QGC01(DataRow dwData)
        {


            or1 = OracleDB.CreateCommand(); 
            or1.CommandText = "SELECT * FROM GSCOLOR   "
            + "  WHERE GSCMANDANT=:GSCMANDANT: AND GSCART=:GSCART: AND GSCVAR=:GSCVAR: AND GSCFARBE=:GSCFARBE:  "; 
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData); 
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QGC03(DataRow dwData)
        { 
            or1 = OracleDB.CreateCommand(); 
            or1.CommandText = "SELECT DISTINCT GS.* FROM EKPOS GA LEFT JOIN GSCOLOR GS ON EKPMANDANT=GSCMANDANT "
                + "  AND  utl_raw.cast_to_varchar2(EKPART)=GSCART AND  utl_raw.cast_to_varchar2(EKPVAR)=GSCVAR AND utl_raw.cast_to_varchar2(EKPFARBE)=GSCFARBE "
                + "  WHERE EKPSA='PO' AND EKPARTGR=1 AND EKPMANDANT=:EKPMANDANT: AND  EKPAUFKRS=:EKPAUFKRS: AND EKPAUFLFD=:EKPAUFLFD: "; 
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData); 
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QGC04(DataRow dwData)
        { 
            or1 = OracleDB.CreateCommand();

            or1.CommandText = "  SELECT DISTINCT GS.* FROM GAAUF GA RIGHT JOIN GSCOLOR GS ON GAMANDANT=GSCMANDANT"
                + " AND GAART=GSCART AND GAVAR=GSCVAR AND GAFARBE=GSCFARBE "
                + "  WHERE GAMANDANT=:GAMANDANT: AND  GAAUFKRS=:GAAUFKRS: AND GAAUFLFD=:GAAUFLFD: "; 
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData); 
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QGC05(DataRow dwData)
        { 
            or1 = OracleDB.CreateCommand(); 
            or1.CommandText = "SELECT DISTINCT GS.* FROM GSCOLOR GS JOIN GSDAT ON GSART=GSCART AND GSVAR=GSCVAR   "
                + "  WHERE GSCART=:GAART: AND GSCVAR=:GAVAR: AND GSCFARBE=:GAFARBE: "; 
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData); 
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QGC06(DataRow dwData)
        {


            or1 = OracleDB.CreateCommand(); 
            or1.CommandText = "SELECT GAAUFKRS,GAAUFLFD,GAAUFPOS,M.* FROM VKPOS JOIN GAAUF ON VKPSA='  ' AND VKPMANDANT=GAMANDANT AND VKPAUFKRS=GAAUFKRS AND VKPAUFLFD=GAAUFLFD AND VKPAUFPOS=GAAUFPOS AND GASA=610"
            + " JOIN GSCOLOR M ON  GSCART=GAART AND GSCVAR=GAVAR AND GSCFARBE=GAFARBE "
                + "WHERE VKPMANDANT=:VKPMANDANT: AND VKPAUFKRS=:VKPAUFKRS: AND VKPAUFLFD=:VKPAUFLFD: "; 
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData); 
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QGC07(DataRow dwData)
        {
             
            or1 = OracleDB.CreateCommand(); 
            or1.CommandText = "SELECT MAX(GSCVAR) AS GSCVAR FROM GSCOLOR "
                + " WHERE  GSCMANDANT=:GAGMANDANT: AND GSCART=:GAGGART:  AND GSCFARBE=:GAGGFARBE:  "; 
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData); 
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QGC08(DataRow dwData)
        { 

            or1 = OracleDB.CreateCommand(); 
            or1.CommandText = "SELECT GAAUFKRS,GAAUFLFD,GAAUFPOS,M.* FROM VKPOS JOIN GAAUF ON VKPSA='  ' AND VKPMANDANT=GAMANDANT AND VKPAUFKRS=GAAUFKRS AND VKPAUFLFD=GAAUFLFD AND VKPAUFPOS=GAAUFPOS AND GASA=610"
            + " JOIN GSCOLOR M ON  GSCART=GAART AND GSCVAR=GAVAR AND GSCFARBE=GAFARBE "
                + "WHERE VKPMANDANT=:VKPMANDANT: AND VKPAUFKRS=:VKPAUFKRS: AND VKPAUFLFD=:VKPAUFLFD: AND VKPAUFPOS=:VKPAUFPOS: "; 
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData); 
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
      
        public DataSet QGC_1(DataRow dwData)
        {


            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT GSCART,GSCVAR,GSCFARBE, GSCFARBE AS KEY,GSCFARBE, GSCBEZ,GSCBEZ AS DES FROM GSCOLOR WHERE  "
            + "  GSCMANDANT=:GSCMANDANT: AND GSCART=:GSCART: AND GSCVAR=:GSCVAR:   ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData); 
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QGC_2(DataRow dwData)
        {


            or1 = OracleDB.CreateCommand(); 
            or1.CommandText = "SELECT * FROM GSCOLOR WHERE  "
            + "  GSCMANDANT=:GSCMANDANT: AND GSCART=:GSCART: AND GSCVAR=:GSCVAR: AND GSCFARBE=:GSCFARBE:  "; 
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData); 
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QGC09(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT DISTINCT X.*, P.* FROM GSCOLOR P JOIN GSDAT X ON GSART=GSCART AND GSVAR=GSCVAR   "
                + "  WHERE GSCMANDANT=:GSCMANDANT:"
                + dwData["GSCART"].ToString()
                 + dwData["GSCVAR"].ToString()
                + dwData["GSCFARBE"].ToString()
                + " ORDER BY GSCART,GSCVAR,GSCFARBE";
             or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QGC10(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT DISTINCT X.* FROM GSCOLOR P JOIN WASTGA X ON WAGMANDANT=GSCMANDANT AND WAGGART=GSCART AND WAGGVAR=GSCVAR AND WAGGFARBE=GSCFARBE  "
                + "  WHERE GSCMANDANT=:GSCMANDANT: AND GSCART=:GSCART: AND GSCVAR=:GSCVAR: AND GSCFARBE=:GSCFARBE:" 
                + " ORDER BY WAGART,WAGVAR,WAGWCOL,WAGPOS";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QGC11(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT DISTINCT X.* FROM GSCOLOR P JOIN BASTGA X ON BAGMANDANT=GSCMANDANT AND BAGGART=GSCART AND BAGGVAR=GSCVAR AND BAGGFARBE=GSCFARBE  "
                + "  WHERE GSCMANDANT=:GSCMANDANT: AND GSCART=:GSCART: AND GSCVAR=:GSCVAR: AND GSCFARBE=:GSCFARBE:"
                + " ORDER BY BAGART,BAGVAR,BAGFARBE,BAGPOS";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QGC12(DataRow dwData)
        {
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT DISTINCT X.* FROM GSCOLOR P JOIN GASTGA X ON GAGGART=GSCART AND GAGGVAR=GSCVAR AND GAGGFARBE=GSCFARBE  "
                + "  WHERE GSCMANDANT=:GSCMANDANT: AND GSCART=:GSCART: AND GSCVAR=:GSCVAR: AND GSCFARBE=:GSCFARBE:"
                + " ORDER BY GAGART,GAGVAR,GAGFARBE,GAGPOS";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QGC13(DataRow dwData)
        {

            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT MAX(GSCVAR) AS GSCVAR,GSFACH FROM GSCOLOR"
                + " JOIN GSDAT ON GSART=GSCART AND GSVAR=GSCVAR"
                + " WHERE  GSCART=:WAGGART:  AND GSCFARBE=:WAGGFARBE:  "
                + "GROUP BY GSART,GSFACH";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public DataSet QGC14(DataRow dwData)
        {

            or1 = OracleDB.CreateCommand();
            or1.CommandText = "SELECT MAX(GSCVAR) AS GSCVAR ,GSFACH FROM GSCOLOR"
                + " JOIN GSDAT ON GSART=GSCART AND GSVAR=GSCVAR"
                + " WHERE  GSCART=:BAGGART:  AND GSCFARBE=:BAGGFARBE:  "
                + "GROUP BY GSART,GSFACH";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            SResult = Connect2Proxy(or1);
            SResult.Tables[0].TableName = TableName;
            return SResult;
        }
        public void DeleteGSCOLOR(DataRow dwData, int option = 1)
        {
            // GSCMANDANT GSCART GSCVAR GSCFARBE
            
            switch (option)
            {

                case 1:DGSC01(dwData);
                    break;
            }
             
        }
        public void DGSC01(DataRow dwData)
        {
            // GSCMANDANT GSCART GSCVAR GSCFARBE
            or1 = OracleDB.CreateCommand();
           
                    or1.CommandText = "DELETE FROM GSCOLOR    "
                 + "  WHERE GSCMANDANT=:GSCMANDANT: AND GSCART=:GSCART: AND GSCVAR=:GSCVAR: AND GSCFARBE=:GSCFARBE:  ";
                    or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
          
            Connect2Proxy(or1);
        }
        public void DGSC00(DataRow dwData)
        {
            // GSCMANDANT GSCART GSCVAR GSCFARBE
            or1 = OracleDB.CreateCommand();

            or1.CommandText = "DELETE FROM GSCOLOR    "
         + "  WHERE GSCMANDANT=:GSCMANDANT:  ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);

            Connect2Proxy(or1);
        }
        public void UpdateGSCOLOR(DataRow dwData, int option=0)
        {
            if (option == 0)
            {
                switch (app.company)
                {
                    case "YGR":
                    case "TST":
                    case "SXN":
                    case "UBT":
                    default:
                        UGSC01(dwData);
                        break;
                    case "JLT":
                        UGSC02(dwData);
                        break;
                    case "FLT":
                        UGSC03(dwData);
                        break;
                }
            } 
        }
        public void UGSC01(DataRow dwData)
        {
            dwData["GSCAENDBEN"] = app.User;
            dwData["GSCAENDDAT"] = date;
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "UPDATE GSCOLOR SET GSCMANDANT=:GSCMANDANT:,GSCART=:GSCART:,GSCVAR=:GSCVAR:,GSCFARBE=:GSCFARBE:,GSCAENDZL=GSCAENDZL+1,GSCAENDBEN=:GSCAENDBEN:,GSCAENDDAT=:GSCAENDDAT:,GSCNEUBEN=:GSCNEUBEN:,GSCNEUDAT=:GSCNEUDAT:,GSCSTATUS=:GSCSTATUS:,GSCSFKZ=:GSCSFKZ:,GSCBEZ=:GSCBEZ:,GSCFKARTNR=:GSCFKARTNR:,GSCKTFARBE=:GSCKTFARBE:,GSCBOM=:GSCBOM:,GSCBOMCGRP=:GSCBOMCGRP:,GSCFDVF=:GSCFDVF:,GSCVORB=:GSCVORB:,GSCNACHB=:GSCNACHB:,GSCFA=:GSCFA:,GSCRUESTGRP=:GSCRUESTGRP:,GSCPRUEFGRP=:GSCPRUEFGRP:,GSCSTATVF=:GSCSTATVF:,GSCKZDUMCOL=:GSCKZDUMCOL:,GSCPSEUDOCOL=:GSCPSEUDOCOL:,GSCTEXTSCHL=:GSCTEXTSCHL:,GSCMUFRB=:GSCMUFRB:,GSCSCHLIAUF=:GSCSCHLIAUF:,GSCFIXTEMP=:GSCFIXTEMP:,GSCFIXTIME=:GSCFIXTIME:,GSCABRASION=:GSCABRASION:,GSCABRAMTR=:GSCABRAMTR:,GSCPROGRP=:GSCPROGRP:,GSCARTGRP=:GSCARTGRP:,GSCRECHNUM=:GSCRECHNUM:,GSCRECHNR=:GSCRECHNR:,GSCPRGRP=:GSCPRGRP:,GSCPREIS=:GSCPREIS:,GSCZUAK=:GSCZUAK:,GSCZUPROZ=:GSCZUPROZ:,GSCANFART=:GSCANFART:,GSCWERT=:GSCWERT:,GSCWERTPROZ=:GSCWERTPROZ:,GSCZUAB=:GSCZUAB:,GSCZUABPROZ=:GSCZUABPROZ:,GSCZTWAHL=:GSCZTWAHL:,GSCVERLUST=:GSCVERLUST:,GSCKALKMG=:GSCKALKMG:,GSCLOAN=:GSCLOAN:,GSCLBAN=:GSCLBAN:,GSCLPAN=:GSCLPAN:,GSCPKL=:GSCPKL:,GSCMU=:GSCMU:,GSCMURLOD=:GSCMURLOD:,GSCMUPROD=:GSCMUPROD:,GSCMUCTOD=:GSCMUCTOD:,GSCMUBIRL=:GSCMUBIRL:,GSCMUDTRL=:GSCMUDTRL:,GSCCOLPT1=:GSCCOLPT1:,GSCCOLPT2=:GSCCOLPT2:,GSCCOLPT3=:GSCCOLPT3:,GSCCOLPT4=:GSCCOLPT4:,GSCFILLER=:GSCFILLER:"
            + "  WHERE GSCMANDANT=:GSCMANDANT: AND GSCART=:GSCART: AND GSCVAR=:GSCVAR: AND GSCFARBE=:GSCFARBE:  ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);

        }
        public void UGSC02(DataRow dwData)
        {
            dwData["GSCAENDBEN"] = app.User;
            dwData["GSCAENDDAT"] = date;
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "UPDATE GSCOLOR SET GSCMANDANT=:GSCMANDANT:,GSCART=:GSCART:,GSCVAR=:GSCVAR:,GSCFARBE=:GSCFARBE:,GSCAENDZL=GSCAENDZL+1,GSCAENDBEN=:GSCAENDBEN:,GSCAENDDAT=:GSCAENDDAT:,GSCNEUBEN=:GSCNEUBEN:,GSCNEUDAT=:GSCNEUDAT:,GSCSTATUS=:GSCSTATUS:,GSCSFKZ=:GSCSFKZ:,GSCBEZ=:GSCBEZ:,GSCFKARTNR=:GSCFKARTNR:,GSCKTFARBE=:GSCKTFARBE:,GSCBOM=:GSCBOM:,GSCBOMCGRP=:GSCBOMCGRP:,GSCFDVF=:GSCFDVF:,GSCVORB=:GSCVORB:,GSCNACHB=:GSCNACHB:,GSCFA=:GSCFA:,GSCRUESTGRP=:GSCRUESTGRP:,GSCPRUEFGRP=:GSCPRUEFGRP:,GSCSTATVF=:GSCSTATVF:,GSCKZDUMCOL=:GSCKZDUMCOL:,GSCPSEUDOCOL=:GSCPSEUDOCOL:,GSCTEXTSCHL=:GSCTEXTSCHL:,GSCMUFRB=:GSCMUFRB:,GSCSCHLIAUF=:GSCSCHLIAUF:,GSCFIXTEMP=:GSCFIXTEMP:,GSCFIXTIME=:GSCFIXTIME:,GSCABRASION=:GSCABRASION:,GSCABRAMTR=:GSCABRAMTR:,GSCPROGRP=:GSCPROGRP:,GSCARTGRP=:GSCARTGRP:,GSCRECHNUM=:GSCRECHNUM:,GSCRECHNR=:GSCRECHNR:,GSCPRGRP=:GSCPRGRP:,GSCPREIS=:GSCPREIS:,GSCZUAK=:GSCZUAK:,GSCZUPROZ=:GSCZUPROZ:,GSCANFART=:GSCANFART:,GSCWERT=:GSCWERT:,GSCWERTPROZ=:GSCWERTPROZ:,GSCZUAB=:GSCZUAB:,GSCZUABPROZ=:GSCZUABPROZ:,GSCZTWAHL=:GSCZTWAHL:,GSCVERLUST=:GSCVERLUST:,GSCKALKMG=:GSCKALKMG:,GSCLOAN=:GSCLOAN:,GSCLBAN=:GSCLBAN:,GSCLPAN=:GSCLPAN:,GSCPKL=:GSCPKL:,GSCMU=:GSCMU:,GSCMURLOD=:GSCMURLOD:,GSCMUPROD=:GSCMUPROD:,GSCMUCTOD=:GSCMUCTOD:,GSCMUBIRL=:GSCMUBIRL:,GSCMUDTRL=:GSCMUDTRL:,GSCCOLPT1=:GSCCOLPT1:,GSCCOLPT2=:GSCCOLPT2:,GSCCOLPT3=:GSCCOLPT3:,GSCCOLPT4=:GSCCOLPT4:,GSCFILLER=:GSCFILLER:"
                        + "  WHERE GSCMANDANT=:GSCMANDANT: AND GSCART=:GSCART: AND GSCVAR=:GSCVAR: AND GSCFARBE=:GSCFARBE:  ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);

        }
        public void UGSC03(DataRow dwData)
        {
            dwData["GSCAENDBEN"] = app.User;
            dwData["GSCAENDDAT"] = date;
            or1 = OracleDB.CreateCommand();
            or1.CommandText = "UPDATE GSCOLOR SET GSCMANDANT=:GSCMANDANT:,GSCART=:GSCART:,GSCVAR=:GSCVAR:,GSCFARBE=:GSCFARBE:,GSCAENDZL=GSCAENDZL+1,GSCAENDBEN=:GSCAENDBEN:,GSCAENDDAT=:GSCAENDDAT:,GSCNEUBEN=:GSCNEUBEN:,GSCNEUDAT=:GSCNEUDAT:,GSCSTATUS=:GSCSTATUS:,GSCSFKZ=:GSCSFKZ:,GSCBEZ=:GSCBEZ:,GSCFKARTNR=:GSCFKARTNR:,GSCKTFARBE=:GSCKTFARBE:,GSCBOM=:GSCBOM:,GSCBOMCGRP=:GSCBOMCGRP:,GSCFDVF=:GSCFDVF:,GSCVORB=:GSCVORB:,GSCNACHB=:GSCNACHB:,GSCFA=:GSCFA:,GSCRUESTGRP=:GSCRUESTGRP:,GSCPRUEFGRP=:GSCPRUEFGRP:,GSCSTATVF=:GSCSTATVF:,GSCKZDUMCOL=:GSCKZDUMCOL:,GSCPSEUDOCOL=:GSCPSEUDOCOL:,GSCTEXTSCHL=:GSCTEXTSCHL:,GSCMUFRB=:GSCMUFRB:,GSCSCHLIAUF=:GSCSCHLIAUF:,GSCFIXTEMP=:GSCFIXTEMP:,GSCFIXTIME=:GSCFIXTIME:,GSCABRASION=:GSCABRASION:,GSCABRAMTR=:GSCABRAMTR:,GSCPROGRP=:GSCPROGRP:,GSCARTGRP=:GSCARTGRP:,GSCRECHNUM=:GSCRECHNUM:,GSCRECHNR=:GSCRECHNR:,GSCPRGRP=:GSCPRGRP:,GSCPREIS=:GSCPREIS:,GSCZUAK=:GSCZUAK:,GSCZUPROZ=:GSCZUPROZ:,GSCANFART=:GSCANFART:,GSCWERT=:GSCWERT:,GSCWERTPROZ=:GSCWERTPROZ:,GSCZUAB=:GSCZUAB:,GSCZUABPROZ=:GSCZUABPROZ:,GSCZTWAHL=:GSCZTWAHL:,GSCVERLUST=:GSCVERLUST:,GSCKALKMG=:GSCKALKMG:,GSCLOAN=:GSCLOAN:,GSCLBAN=:GSCLBAN:,GSCLPAN=:GSCLPAN:,GSCPKL=:GSCPKL:,GSCMU=:GSCMU:,GSCMURLOD=:GSCMURLOD:,GSCMUPROD=:GSCMUPROD:,GSCMUCTOD=:GSCMUCTOD:,GSCMUBIRL=:GSCMUBIRL:,GSCMUDTRL=:GSCMUDTRL:,GSCCOLPT1=:GSCCOLPT1:,GSCCOLPT2=:GSCCOLPT2:,GSCCOLPT3=:GSCCOLPT3:,GSCCOLPT4=:GSCCOLPT4:,GSCRGBWERT1=:GSCRGBWERT1:,GSCRGBWERT2=:GSCRGBWERT2:,GSCRGBWERT3=:GSCRGBWERT3:,GSCFILLER=:GSCFILLER:"
             + "  WHERE GSCMANDANT=:GSCMANDANT: AND GSCART=:GSCART: AND GSCVAR=:GSCVAR: AND GSCFARBE=:GSCFARBE:  ";
            or1.CommandText = INTEXDBC.InjectData(or1.CommandText, dwData);
            Connect2Proxy(or1);

        }
    }
}
